<?php
    //include ("lib/DataProvider.php");

    if(isset($_GET['dms']) == true)
        $dms = $_GET['dms'];
    else
        $dms = 1;
?>
<?php
                    $sql = "SELECT * FROM ChiTietLoaiSach WHERE BiXoa = 0 AND MaChiTietLoaiSach = $dms";
                    $result = DataProvider::ExecuteQuery($sql);
                    $row = mysql_fetch_array($result);
                    //echo $id;

?>
<div class="row">
    <div class="header">
        <h2>
            <span>Danh Mục Sách - <?php echo $row["TenChiTietLoaiSach"]; ?></span>
        </h2>
    </div>

    <div class="row">
        <ul class="homepage-books">
            <?php
                    $sql = "SELECT * FROM Sach WHERE MaChiTietLoaiSach = $dms";
                    $result = DataProvider::ExecuteQuery($sql);
                    while($row = mysql_fetch_array($result)){

            ?>
            <li>
                <a href="index.php?a=5&id=<?php echo $row["MaSach"]; ?> " class="coupon-thumb">
                    <img src="<?php echo $row["HinhURL"]; ?>" alt="<?php echo $row["TenSach"]; ?>" title="<?php echo $row["TenSach"]; ?>" />
                    <div class="coupon-inner">
                        <h5 class="coupon-title"><?php echo $row["TenSach"]; ?></h5>
                        <p class="coupon-desciption"><?php echo $row["TacGia"]; ?></p>
                        <div class="coupon-meta">
                            <div class="coupon-price">
                                <span class="coupon-new-price">Chi tiết</span>
                            </div>
                        </div>
                    </div>
                </a>
            </li>
            <?php
                }
            ?>
        </ul>
    </div>

</div>